-
Notifications
You must be signed in to change notification settings - Fork 5.8k
CodeLoom-4-Bedrock #7622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
CodeLoom-4-Bedrock #7622
Conversation
# Check if python/test_tools/{service}_stubber.py exists | ||
# If missing, create it following existing patterns | ||
# Add to python/test_tools/stubber_factory.py | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the service to the stubber factory If statement.
#### Hello Scenario Structure | ||
- **File naming**: `{service}_hello.py` or hello function in main module | ||
- **Function naming**: `hello_{service}()` or `main()` | ||
- **Documentation**: Include docstrings explaining the hello example purpose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use wrapper functions for the hello example.
- **Functions**: Use descriptive names with snake_case | ||
- **Classes**: Use PascalCase for class names | ||
- **Constants**: Use UPPER_CASE for constants | ||
- **Type Hints**: Include type annotations where beneficial |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use paginators when available.
|
||
3. **Test File Structure:** | ||
- **Unit Tests**: `test_{service}_wrapper.py` - Test wrapper class methods with mocked responses | ||
- **Integration Tests**: `test_{service}_integration.py` - Test against real AWS services (marked with `@pytest.mark.integ`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write one integration test that runs the entire scenario.
- **Test markers**: Use `@pytest.mark.integ` for integration tests | ||
- **Fixtures**: Create reusable fixtures for AWS resources | ||
- **Cleanup**: Ensure proper resource cleanup in tests | ||
- **Mocking**: Use `boto3` stubber for unit tests when appropriate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use MonkeyPatch mockers.
This PR takes care of AI code generation using CodeLoom. CodeLoom now also works with Bedrock Knowledge Bases